function [verts1 verts2] = TransformVerts( verts1, verts2, theta, phi )

RotY = @(x) [cos(x) 0 -sin(x); 0 1 0; sin(x) 0 cos(x)];
RotZ = @(x) [cos(x) -sin(x) 0; sin(x) cos(x) 0; 0 0 1;];

b = [3.0; 0; 0.5]';

% return transformed version of the vertices
% verts1 rotates about the z-axis staying in the x-y plane by theta
% verts2 rotates perpedicular to verts 1 by phi

% phi and theta are taken in radians

verts2_ = verts2 - repmat(b',1,size(verts2,2));

verts2_ = RotY(phi)*verts2_;

verts1 = RotZ(theta)*verts1;
verts2 = verts2_ + repmat(b',1,size(verts2,2));
verts2 = RotZ(theta)*verts2;

breakhere = 1; 


